// kX Driver / kX Driver Interface / kX Driver Effects Library
// Copyright (c) Eugene Gavrilov and Max Mikhailov, 2001-2004.
// All rights reserved

/*
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

// Dynamica
// (c) eYagos, 2003-2004. All rights reserved

// 10kX microcode
// Patch name: 'dynamica'

char *dynamica_copyright="by eYagos - Copyright (c) 2005. All rights reserved";
char *dynamica_engine="kX";
char *dynamica_comment="Dynamics Processor Agent v4.0";
char *dynamica_created="01/28/2005";
char *dynamica_guid="7c0403d2-aa58-41e8-b977-8deff222844e";

char *dynamica_name="Dynamics Processor";
int dynamica_itramsize=400,dynamica_xtramsize=0;

#define	R_iGAIN_I	0x8002
#define	R_iGAIN_F	0x8003
#define R_AttackL	0x8004
#define R_ReleaseL	0x8005
#define R_Attack	0x8006
#define R_Release	0x8007

#define R_Thres1	0x8008
#define R_Thres2	0x8009
#define R_Offset	0x800a

#define R_Rat1_f	0x800b
#define R_Rat1_i	0x800c
#define R_Rat2_f	0x800d
#define R_Rat2_i	0x800e
#define R_Rat3_f	0x800f
#define R_Rat3_i	0x8010

#define R_GAIN_I	0x8011
#define R_GAIN_F	0x8012

#define R_LEVEL		0x8013
#define R_GAINDB	0x8014

#define R_soft_long 0x8015
#define R_v_medio1  0x8016
#define R_v_medio2	0x8017

#define R_mon_IN_L	0x8018
#define R_mon_IN_R	0x8019
#define R_mon_OUT_L	0x801a
#define R_mon_OUT_R	0x801b

#define	R_tmp1		0x8025
#define	R_tmp2		0x8026

#define R_delW1		0x802a
#define R_delR1		0x802c
#define R_delW2		0x802e
#define R_delR2		0x8030

dsp_register_info dynamica_info[]={
	{ "in_L",0x4000,0x7,0xffff,0x0 },
	{ "in_R",0x4001,0x7,0xffff,0x0 },
	{ "side_L",0x4002,0x7,0xffff,0x0 },
	{ "side_R",0x4003,0x7,0xffff,0x0 },
	{ "out_L",0x8000,0x8,0xffff,0x0 },
	{ "out_R",0x8001,0x8,0xffff,0x0 },
	{ "iGAIN_I",0x8002,0x1,0xffff,0x1 },
	{ "iGAIN_F",0x8003,0x1,0xffff,0x0 },
	{ "AttackL",0x8004,0x1,0xffff,0x7ac9d292 },
	{ "ReleaseL",0x8005,0x1,0xffff,0x7ff92c8d },
	{ "Attack",0x8006,0x1,0xffff,0x7fe38dd7 },
	{ "Release",0x8007,0x1,0xffff,0x7ff92c8d },
	{ "Thres1",0x8008,0x1,0xffff,0x68e324d6 },
	{ "Thres2",0x8009,0x1,0xffff,0xd0ebbf8 },
	{ "Offset",0x800a,0x1,0xffff,0x4de0e7e0 },
	{ "Rat1",0x800b,0x1,0xffff,0x7fffffff },
	{ "Rat1i",0x800c,0x1,0xffff,0x0 },
	{ "Rat2",0x800d,0x1,0xffff,0x25a5a5a5 },
	{ "Rat2i",0x800e,0x1,0xffff,0x0 },
	{ "Rat3",0x800f,0x1,0xffff,0x7fffffff },
	{ "Rat3i",0x8010,0x1,0xffff,0x0 },
	{ "GAIN_I",0x8011,0x1,0xffff,0x1 },
	{ "GAIN_F",0x8012,0x1,0xffff,0x0 },
	{ "Level",0x8013,0x1,0xffff,0x0 },
	{ "GaindB",0x8014,0x1,0xffff,0x0 },
	{ "soft_long",0x8015,0x1,0xffff,0x28 },
	{ "v_medio1",0x8016,0x1,0xffff,0x0 },
	{ "v_medio2",0x8017,0x1,0xffff,0x0 },
	{ "mon_IN_L",0x8018,0x1,0xffff,0x0 },
	{ "mon_IN_R",0x8019,0x1,0xffff,0x0 },
	{ "mon_OUT_L",0x801a,0x1,0xffff,0x0 },
	{ "mon_OUT_R",0x801b,0x1,0xffff,0x0 },
	{ "res",0x801c,0x5,0xffff,0x1f },
	{ "c_mask",0x801d,0x5,0xffff,0x3ffffff },
	{ "m1",0x801e,0x5,0xffff,0x13ffffe7 },
	{ "c0",0x801f,0x5,0xffff,0x16506662 },
	{ "c1",0x8020,0x5,0xffff,0xe9aecfa2 },
	{ "c2",0x8021,0x5,0xffff,0xc53db294 },
	{ "d0",0x8022,0x5,0xffff,0x1ec7a9ff },
	{ "d1",0x8023,0x5,0xffff,0x52966afb },
	{ "d2",0x8024,0x5,0xffff,0xe1652bcc },
	{ "tmp1",0x8025,0x3,0xffff,0x0 },
	{ "tmp2",0x8026,0x3,0xffff,0x0 },
	{ "tmp3",0x8027,0x3,0xffff,0x0 },
	{ "tmp4",0x8028,0x3,0xffff,0x0 },
	{ "tmp5",0x8029,0x3,0xffff,0x0 },
	{ "delW1",0x802a,0x49,0xffff,0x0 },
	{ "&delW1",0x802b,0xb,0xffff,0x0 },
	{ "delR1",0x802c,0x29,0xffff,0x92 },
	{ "&delR1",0x802d,0xb,0xffff,0x92 },
	{ "delW2",0x802e,0x49,0xffff,0xc8 },
	{ "&delW2",0x802f,0xb,0xffff,0xc8 },
	{ "delR2",0x8030,0x29,0xffff,0x15a },
	{ "&delR2",0x8031,0xb,0xffff,0x15a },
};

dsp_code dynamica_code[]={
	{ 0x0,0x8025,0x2040,0x4000,0x204f },
	{ 0x0,0x8026,0x2040,0x4001,0x204f },
	{ 0x0,0x802a,0x8025,0x2040,0x2040 },
	{ 0x0,0x802e,0x8026,0x2040,0x2040 },
	{ 0x9,0x8025,0x8025,0x8025,0x2040 },
	{ 0x9,0x8026,0x8026,0x8026,0x2040 },
	{ 0xe,0x8025,0x8025,0x204d,0x8026 },
	{ 0x4,0x8026,0x2040,0x8025,0x8002 },
	{ 0x0,0x8025,0x8026,0x8025,0x8003 },
	{ 0xc,0x8025,0x8025,0x801c,0x2041 },
	{ 0x8,0x8026,0x8025,0x801d,0x2040 },
	{ 0x4,0x8026,0x2040,0x8026,0x2047 },
	{ 0x0,0x8027,0x2040,0x8026,0x801f },
	{ 0x0,0x8029,0x8020,0x8027,0x204f },
	{ 0x0,0x8028,0x8021,0x8027,0x204f },
	{ 0x0,0x8026,0x2040,0x8029,0x8028 },
	{ 0x0,0x8025,0x8025,0x8026,0x8027 },
	{ 0x9,0x8026,0x8025,0x8004,0x8013 },
	{ 0xa,0x8026,0x2040,0x8005,0x8026 },
	{ 0xe,0x8013,0x8025,0x8026,0x8013 },
	{ 0x1,0x8028,0x8013,0x8008,0x204f },
	{ 0x4,0x8026,0x8008,0x8028,0x800c },
	{ 0x0,0x8026,0x8026,0x8028,0x800b },
	{ 0xa,0x8026,0x8026,0x8026,0x2040 },
	{ 0x4,0x8027,0x8008,0x8028,0x800e },
	{ 0x0,0x8027,0x8027,0x8028,0x800d },
	{ 0xa,0x8027,0x8027,0x8027,0x2040 },
	{ 0x9,0x8025,0x8028,0x8026,0x2040 },
	{ 0xa,0x8025,0x2040,0x8027,0x8025 },
	{ 0x1,0x8029,0x8013,0x8009,0x204f },
	{ 0x4,0x8027,0x800a,0x8029,0x8010 },
	{ 0x0,0x8027,0x8027,0x8029,0x800f },
	{ 0xa,0x8027,0x8027,0x8027,0x2040 },
	{ 0x9,0x8026,0x8029,0x8025,0x2040 },
	{ 0xa,0x8026,0x2040,0x8027,0x8026 },
	{ 0x9,0x8027,0x8028,0x8028,0x2040 },
	{ 0x4,0x8027,0x204e,0x8027,0x8015 },
	{ 0xb,0x8027,0x8027,0x8027,0x2040 },
	{ 0x0,0x8027,0x2040,0x8027,0x8027 },
	{ 0x1,0x8026,0x8026,0x8016,0x8027 },
	{ 0x9,0x8027,0x8029,0x8029,0x2040 },
	{ 0x4,0x8027,0x204e,0x8027,0x8015 },
	{ 0xb,0x8027,0x8027,0x8027,0x2040 },
	{ 0x0,0x8027,0x2040,0x8027,0x8027 },
	{ 0x1,0x8026,0x8026,0x8017,0x8027 },
	{ 0x1,0x8025,0x8026,0x8013,0x204f },
	{ 0x9,0x8026,0x2040,0x8025,0x8025 },
	{ 0x9,0x8027,0x2040,0x8014,0x8014 },
	{ 0x9,0x8027,0x8026,0x8007,0x8027 },
	{ 0xa,0x8027,0x2040,0x8006,0x8027 },
	{ 0xe,0x8014,0x8025,0x8027,0x8014 },
	{ 0x4,0x8026,0x2041,0x2040,0x2040 },
	{ 0x0,0x8025,0x8014,0x2040,0x2040 },
	{ 0xf,0x2057,0x2057,0x2044,0x2042 },
	{ 0x4,0x8026,0x2040,0x8026,0x2047 },
	{ 0x1,0x8025,0x8025,0x801e,0x204f },
	{ 0xf,0x2057,0x2057,0x2044,0x2042 },
	{ 0x4,0x8026,0x2040,0x8026,0x2047 },
	{ 0x1,0x8025,0x8025,0x801e,0x204f },
	{ 0xf,0x2057,0x2057,0x2044,0x2042 },
	{ 0x4,0x8026,0x2040,0x8026,0x2047 },
	{ 0x1,0x8025,0x8025,0x801e,0x204f },
	{ 0x0,0x8025,0x8025,0x204f,0x204f },
	{ 0x8,0x8029,0x8025,0x801d,0x2040 },
	{ 0x1,0x8027,0x8025,0x8029,0x204f },
	{ 0x0,0x8027,0x2040,0x8027,0x2047 },
	{ 0xc,0x8027,0x204f,0x8027,0x2041 },
	{ 0xd,0x8027,0x8027,0x801c,0x2041 },
	{ 0x4,0x8029,0x2040,0x8029,0x2047 },
	{ 0x0,0x8027,0x2040,0x8027,0x8029 },
	{ 0x0,0x8029,0x2040,0x8029,0x8022 },
	{ 0x0,0x8028,0x8023,0x8029,0x204f },
	{ 0x0,0x8029,0x8024,0x8029,0x204f },
	{ 0x0,0x8028,0x2040,0x8028,0x8029 },
	{ 0xd,0x8025,0x8025,0x801c,0x2040 },
	{ 0x0,0x8025,0x8025,0x8028,0x8027 },
	{ 0x0,0x8027,0x2040,0x802c,0x8025 },
	{ 0x4,0x8027,0x2040,0x8027,0x8026 },
	{ 0x0,0x8028,0x2040,0x8030,0x8025 },
	{ 0x4,0x8028,0x2040,0x8028,0x8026 },
	{ 0x4,0x8025,0x2040,0x8027,0x8011 },
	{ 0x0,0x8000,0x8025,0x8027,0x8012 },
	{ 0x4,0x8026,0x2040,0x8028,0x8011 },
	{ 0x0,0x8001,0x8026,0x8028,0x8012 },
	{ 0x9,0x8025,0x802c,0x802c,0x2040 },
	{ 0x9,0x8026,0x8030,0x8030,0x2040 },
	{ 0xa,0x8018,0x8025,0x8025,0x8018 },
	{ 0xa,0x8019,0x8026,0x8026,0x8019 },
	{ 0x9,0x8025,0x8000,0x8000,0x2040 },
	{ 0x9,0x8026,0x8001,0x8001,0x2040 },
	{ 0xa,0x801a,0x8025,0x8025,0x801a },
	{ 0xa,0x801b,0x8026,0x8026,0x801b },
};
